<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\modules\Cruise\models\Restaurant */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="restaurant-form">

    <?php $form = ActiveForm::begin([
                                 'options' => ['enctype' => 'multipart/form-data',],
                                 'layout' => 'horizontal',
                                 'fieldConfig' => [
                                    'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                                    'horizontalCssClasses' => [
                                        'label' => 'col-sm-2',
                                        'wrapper' => 'col-sm-7',
                                        'error' => '',
                                    ],
                                 ],
                            ]); ?>

    <?= $form->field($model, 'cruise_id')->label(false)->hiddenInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'en_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'num',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('人')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'open_time',['template'=>'{label}<div class="col-md-3">{input}{error}</div>'])->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'spend')->inline(true)->radioList(\Yii::$app->params['spend']) ?>

    <?= $form->field($model, 'ceil',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('层')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'desc')->textArea(['maxlength' => true]) ?>

    <?= $form->field($model, 'status')->inline(true)->radioList(\Yii::$app->params['status']) ?>

    <?php  //echo $this->render('../_image', ['model' => $model, 'type'=>3]); ?>
    <hr>
    <div class="form-group text-center">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
